<?php
namespace app\index\model;
use think\Model;
use think\model\concern\SoftDelete;
use think\Validate;
class Common extends Model
{
	protected $autoWriteTimestamp = true;
	use SoftDelete;
	protected $deleteTime = 'delete_time';
	protected $defaultSoftDelete = 0;
	
	public function message($code,$msg='',$data=[]){
		$msg=[
			'code'=>$code,
			'msg'=>$msg,
			'data'=>$data
		];
		return json($msg);
	}
}